/*
 * DA2Address.java
 *
 * Created on 11 marzo 2007, 19.50
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package com.bloomingstars.bluepad.comm;

/**
 *
 * @author vega
 */
public class DA2Address
{   
    
    public static final int ADDRESS = 60;
    public static final int DEVICE_NAME = 61;
    
    public DA2Address()
    {
    }
    
    public DA2Address(String s, int what)
    {
        switch (what)
        {
            case ADDRESS:
                address = s;
                deviceName = "";
                break;
                
            case DEVICE_NAME:
                address = "";
                deviceName = s;
                break;
        }
    }
    
    public DA2Address(String addr, String name)
    {
        address = addr;
        deviceName = name;
    }
    
    public String getAddress()
    {
        return address;
    }
    
    public void setAddress(String addr)
    {
        address = addr;
    }
    
    public String getDeviceName()
    {
        return deviceName;
    }
    
    public void setDeviceName(String name)
    {
        deviceName = name;
    }
    
        
    /**
     * Remote device address. For Bluetooth communication, it's the connection
     * URL (e.g. &quot;btspp://&quot;); for serial API-based communication,
     * it's the COM port name (e.g. COM4, COM8, etc.)
     */
    private String address = "";
    
    /**
     * Device name (e.g. &quot;DA2&quot;) used mainly for Bluetooth communication
     */
    private String deviceName = "";
}
